(function() {
const html_loading_yh = `<link rel="stylesheet" href="/ast/yhload/animate-load.css">
<div class="overlay-yh">
  <div class="loading four-balls"></div>
  <div class="four-balls-text">Loading...</div>
</div>`;
function isnowok() {
    return document.querySelector('.yh-loadingnow') !== null;
}
function show(){
    if (!isnowok()) {
        const loadingElement = document.createElement('div');
        loadingElement.className = 'yh-loadingnow';
        loadingElement.innerHTML = html_loading_yh;
        document.body.appendChild(loadingElement);
    }
}
function hide(){
    if (isnowok()) {
        const loadingElement = document.querySelector('.yh-loadingnow');
        document.body.removeChild(loadingElement);
    }
}
yhload = {
    show,
    hide
};
})();